import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
			pageLoading: false,      //第一次加载和刷新页面的loading
			dataLoading:false,   //数据请求loading
			StationCode:'',  //隶属站编号 即发车站站码
			startPrintName:'',
			StopCode:'',    //到站站码
			endPrintName:'',
			startPoint:{
				Lng:0,
				Lat:0
			}
			
    },
    mutations: {
			setPageLoading(state, val){
				state.pageLoading = val
			},
			setDataLoading(state, val){
				state.dataLoading = val
			},
			setStartPrintName(state, val){
				state.startPrintName = val
			},
			setEndPrintName(state, val){
				state.endPrintName = val
			},
			setStopCode(state, val){
				state.StopCode = val
			},
			setStationCode(state, val){
				state.StationCode = val
			},
			setStartPoint(state, valLng , valLat){
				state.startPoint.Lng = valLng
				state.startPoint.Lat = valLat
			}
    },
    getters: {
     
    },
    actions: {}
		
})

export default store